package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TeachingclassMapper;
import com.ruoyi.system.domain.Teachingclass;
import com.ruoyi.system.service.ITeachingclassService;

/**
 * 班级管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-07-20
 */
@Service
public class TeachingclassServiceImpl implements ITeachingclassService 
{
    @Autowired
    private TeachingclassMapper teachingclassMapper;

    /**
     * 查询班级管理
     * 
     * @param id 班级管理主键
     * @return 班级管理
     */
    @Override
    public Teachingclass selectTeachingclassById(Long id)
    {
        return teachingclassMapper.selectTeachingclassById(id);
    }

    /**
     * 查询班级管理列表
     * 
     * @param teachingclass 班级管理
     * @return 班级管理
     */
    @Override
    public List<Teachingclass> selectTeachingclassList(Teachingclass teachingclass)
    {
        return teachingclassMapper.selectTeachingclassList(teachingclass);
    }

    /**
     * 新增班级管理
     * 
     * @param teachingclass 班级管理
     * @return 结果
     */
    @Override
    public int insertTeachingclass(Teachingclass teachingclass)
    {
        teachingclass.setCreateTime(DateUtils.getNowDate());
        return teachingclassMapper.insertTeachingclass(teachingclass);
    }

    /**
     * 修改班级管理
     * 
     * @param teachingclass 班级管理
     * @return 结果
     */
    @Override
    public int updateTeachingclass(Teachingclass teachingclass)
    {
        teachingclass.setUpdateTime(DateUtils.getNowDate());
        return teachingclassMapper.updateTeachingclass(teachingclass);
    }

    /**
     * 批量删除班级管理
     * 
     * @param ids 需要删除的班级管理主键
     * @return 结果
     */
    @Override
    public int deleteTeachingclassByIds(Long[] ids)
    {
        return teachingclassMapper.deleteTeachingclassByIds(ids);
    }

    /**
     * 删除班级管理信息
     * 
     * @param id 班级管理主键
     * @return 结果
     */
    @Override
    public int deleteTeachingclassById(Long id)
    {
        return teachingclassMapper.deleteTeachingclassById(id);
    }
}
